package com.dev.bbs.domain;

import javax.persistence.Id;
import javax.persistence.Transient;

import com.dev.common.annotation.Excel;
import com.dev.common.core.domain.BaseEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import tk.mybatis.mapper.annotation.KeySql;

/**
 * 社区文章对象 bbs_article
 *
 * @author ruoyi
 * @date 2019-09-17
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class BbsArticle extends BaseEntity
{
    private static final long serialVersionUID = -8163157997568851052L;

    /** 文章编号 */
    @Id
    @KeySql(useGeneratedKeys = true)
    private Long              id;

    /** 标题 */
    @Excel(name = "标题")
    private String            title;

    /** 分类(1:提问,2:分享,3:讨论,4:建议) */
    @Excel(name = "分类", readConverterExp = "1=提问,2=分享,3=讨论,4=建议")
    private Integer           cate;

    /** 文章内容 */
    @Excel(name = "文章内容")
    private String            content;

    /** 状态 */
    @Excel(name = "状态")
    private Integer           status;

    /** 置顶 */
    @Excel(name = "置顶")
    private Boolean           top;

    /** 加精 */
    @Excel(name = "加精")
    private Boolean           rec;

    /** 飞吻 */
    @Excel(name = "飞吻")
    private Long              kiss;

    /** 产品 */
    @Excel(name = "产品")
    private String            product;

    /** 评论数 */
    @Excel(name = "评论数")
    private Long              comment;

    /** 浏览数 */
    @Excel(name = "浏览数")
    private Long              views;

    /** 版本号 */
    @Excel(name = "版本号")
    private String            version;

    /** 浏览器 */
    @Excel(name = "浏览器")
    private String            browser;

    /** 作者ID*/
    @Excel(name = "作者ID")
    private Long              author;

    /** 作者信息*/
    @Transient
    private BbsUser           bbsUser;
}
